package com.lanyun.aicorrectassistant.handler;


import lombok.extern.slf4j.Slf4j;
import org.springframework.http.server.ServerHttpResponse;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;

/**
 * @Author: Jqchan_
 */
@Slf4j
public class SseEmitterUTF8 extends SseEmitter {

    @Override
    protected void extendResponse(ServerHttpResponse outputMessage) {
        super.extendResponse(outputMessage);
        outputMessage.getHeaders().set("Content-Type", "text/event-stream;charset=UTF-8");
    }

    public SseEmitterUTF8(Long timeout) {
        super(timeout);
    }
}
